package org.example.myleet.p1319;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(1 == solution.makeConnected(4, new int[][]{{0,1},{0,2},{1,2}}));
        Assert.isTrue(2 == solution.makeConnected(6, new int[][]{{0,1},{0,2},{0,3},{1,2},{1,3}}));
        Assert.isTrue(-1 == solution.makeConnected(6, new int[][]{{0,1},{0,2},{0,3},{1,2}}));
        Assert.isTrue(0 == solution.makeConnected(5, new int[][]{{0,1},{0,2},{3,4},{2,3}}));
        Assert.isTrue(0 == solution.makeConnected(1, new int[][]{{0,1}}));
    }
}
